﻿using System;
using Core.Library;
using DataObject.Product;

namespace KMT.Pages.Product
{
    public partial class Detail : System.Web.UI.Page
    {
        protected int ProductId;

        protected void Page_Load(object sender, EventArgs e)
        {
            ProductId = Utils.GetIdFromRequestString(Utils.ProductId, 0);

            if (ProductId <= 0) return;

            var o = ProductController.Product_GetById(ProductId);
            if (o != null)
            {
                TabsContentDetail.ProductId = o.ProductId;
                ProductDetail.ProductId     = o.ProductId;

                RelatedProduct.ProductId    = o.ProductId;
                RelatedProduct.CategoryId   = o.CategoryId;

                TabsComment.ProductId       = o.ProductId;    
            }
        }
    }
}